package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.model.ProductBookRecordModel;
import com.ygqh.baby.po.YgPrepayBookRecord;
import com.ygqh.baby.po.YgPrepayBookRecordExample;

import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface YgPrepayBookRecordMapper {
	int countByExample(YgPrepayBookRecordExample example);

	int deleteByExample(YgPrepayBookRecordExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgPrepayBookRecord record);

	int insertSelective(YgPrepayBookRecord record);

	List<YgPrepayBookRecord> selectByExample(YgPrepayBookRecordExample example);

	YgPrepayBookRecord selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgPrepayBookRecord record, @Param("example") YgPrepayBookRecordExample example);

	int updateByExample(@Param("record") YgPrepayBookRecord record, @Param("example") YgPrepayBookRecordExample example);

	int updateByPrimaryKeySelective(YgPrepayBookRecord record);

	int updateByPrimaryKey(YgPrepayBookRecord record);

	int countSuper(@Param("q") String q, @Param("userId") Long userId, @Param("recordStatus") YgPrepayBookRecord.RecordStatus recordStatus,
				   @Param("userName") String userName);

	List<ProductBookRecordModel> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q, @Param("userId") Long userId,
											 @Param("recordStatus") YgPrepayBookRecord.RecordStatus recordStatus, @Param("userName") String userName);

	List<ProductBookRecordModel> selectByRecordCode(@Param("recordCodeList") List<Long> recordCodeList);

	List<ProductBookRecordModel> selectBetweenDate(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("recordStatus") String recordStatus);

	List<ProductBookRecordModel> selectByBookId(@Param("bookId") Long bookId, @Param("recordStatus") YgPrepayBookRecord.RecordStatus recordStatus);

	List<ProductBookRecordModel> selectByOrderId(@Param("orderId") Long orderId, @Param("recordStatus") YgPrepayBookRecord.RecordStatus recordStatus);

	List<ProductBookRecordModel> selectForCancel(@Param("startDate") Date startDate);

	int updateRecordByCancelOrder(@Param("orderId") Long orderId);

	List<Map<String, Object>> selectBookTotal(@Param("id") Long id);
}



